Build Dynamic Images
Dynamic Images or "Infographics" give users the ability to create data-driven infographics. These infographics can then be added to presentations and reports, where they can be configured to use data interactions from other artifacts - grids, charts, slicers and variables - to create responsive graphical displays of information that are more intuitive to understanding the underlying analysis, and are interactive for the end user.
Dynamic images may be based on the box stock images available in Illustrate, or on images that you import. For details about importing your own images, click here.
Dynamic PQL Functions
- Click here to read about how to configure dynamic PQL functions in Illustrate
- Click here to review the dynamic PQL functions in Illustrate
Image Properties
To construct a dynamic image, you must configure at least one of its dynamic properties (yellow highlight below). These properties can be used to drive the image color, show or hide the image, or drive its size, rotation, or volume.
- Click here to learn more about the dynamic image properties.
Set Dynamic Image Properties
Dynamic images are configured by injecting values from the Dynamic Text Editor into the relevant properties (yellow highlight above). To open the editor:
- Add an image to the canvas.
- With the image selected (red highlight below), go to the Properties panel.
- Enable and configure the property that you want to make dynamic.
Set the Actual Value (that is, the value that drives the dynamic text) via the Dynamic Text Editor (purple highlight below). The Condition, Minimum, or Maximum values, may be driven by a given static value or by a dynamic formula configured via the text editor.
- Click here to learn about the dynamic text properties.
Navigate the Dynamic Text Editor
The Dynamic Text Editor is used to configure dynamic formulas that will then drive the selected dynamic property for your image.
From the Dynamic Text Editor:
- Open the Content drop-down (orange highlight below), find and select the grid you want to base your dynamic formula on. You must select a grid from a Discovery or a Visual Area from a Tabulation.
- Write your dynamic text expression in the script editor (red highlight).
- Use the PQL Functions library (yellow highlight) to add SQL expressions to your script.
- Select the relevant cells from the grid (purple highlight) to populate the given PQL expressions,
Dynamic PQL Functions
The Pyramid Query Language or PQL (pronounced 'Prequel') is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allows users to query data and build analytical logic.
The Dynamic Text Editor exposes Dynamic and Common functions. Dynamic functions are a set of specialized method that are designed to act on a given query's result set. Common functions are a set of methods that are found in most programmatic and mathematical function libraries. These functions are used to perform logic on basic data without concern for data structures, context, or even source.
To add a PQL function from the library to the script editor, simply double click on it. You will then need to inject values into the function.
Using the LLM AI-Driven PQL Function
Pyramid's Generative AI integration enables you to use AI to generate scripts and images, dynamic text and infographics, calculations and lists, schedules, colors, and more. This allows you to generate a range of content, including complex code, by simply providing a text prompt.
Use the LLM AI-driven PQL function (from the Common PQL functions, alias ChatGPT) to generate dynamic text in your custom tooltip. While this function cannot tell you about your data set, it can add additional information and background to your presentation or publication.
Warning: AI-generated assets are generated from public domain algorithms, which can produce both erroneous and inconsistent or random results. Use at your own risk.
STEP 1
Open Illustrate, and choose an image from the Stock Images panel and drag it onto the canvas. The stock images panel is divided thematically into five different categories. Alternatively, users can their own saved images by dropping them directly onto the canvas from their folder location.
Alternatively, import your own image.
Move and resize your image as desired, holding down the shift key to maintain the aspect ratio.
STEP 2
In the Properties panel on the right, enable the Color panel by selecting its slider.
You can configure your dynamic image to change color, show or hide, change size, rotate, or change in volume, based on data values, by choosing the corresponding option in the Properties panel.
STEP 3
Click the plus sign next to Actual Value. This will open a new dialog along the bottom of the screen. Open the Content panel, find and select the content you want to base your dynamic text on. Once selected, the grid will appear in the editor. From this window, you can also write expressions using the dynamic functions in the drop down lists. Click here for information about configuring dynamic functions in Illustrate.
STEP 4
Select the cell containing the value that should be represented in the dynamic image. In this example, the image will be configured to provide a color indication of whether or not sales goals for accessories have been met.
Once you've made your selection, click Test to verify that the cell has been selected successfully.
STEP 5
Now, in the Color panel, write insert values into Below Value and Above Value windows.
In this example, 200 000 was written in the Below Value window, and 400 000 in the Above Value window. This means that whenever the value of accessories sales falls below $200,000, the image will be red. When the value is above $400,000, it will be green, and whenever it falls between these values the image will be yellow.
Click the paint buckets to select different colors.
STEP 6
Next, click apply, and save your image.
To find out how to add your dynamic image to a presentation or publication, see Use Dynamic Images and Texts.
Using Tabulate for Multiple Source Grids
Users requiring dynamic text from disparate data based on multiple queries can use Tabulate as the source for the dynamic text. Tabulate allows you to blend queries from multiple data sources into a single Tabulation. You must then define a Visual Area that can be used as a single data source for the dynamic text. The Visual Area can then be used as a source for the data grid that the dynamic text is based on.
Step 1
In Tabulate, drag and drop different queries onto the canvas. In this example Sales and Returns is dropped on the left hand side of the Tabulate canvas and the Expenses and Margin query is dropped on the right hand side of the canvas.
Step 2
Select the required area including both queries.
Step 3
Set the Visual Area by clicking on the Set Visual Area button from the Visual Area drop-down on the Tabulate ribbon, name the visual area and save the Tabulate worksheet
Note that you must save the Visual Area in the Tabulation and the Tabulate worksheet in order to use it in an Illustrate item.
Step 4
Build your dynamic text (as per previous example), select the Visual Area as the source for the data grid.
From the Content drop down, select the Country Sales and Expenses Tabulate item, then select the Visual Area - "Sales_And_Expenses". This will be used as the data grid for the dynamic text.
Step 5
You can now use any data from the Visual Area in your dynamic text. In this dynamic text formula (orange box) we have subtracted New South Wales Expenses (green box) from New South Wales sales (red box). The result of $47,051.61 can be seen in the dynamic text (orange box). This demonstrates how data from disparate sources can be used to generate dynamic text.